home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / doc / unix / creatdb.doc < prev    next >
Encoding:
Text File  |  1992-11-19  |  6.1 KB  |  138 lines

  1.  
  2.  
  3.  
  4.  
  5.      CREATDB(UNIX)                11/6/79                CREATDB(UNIX)
  6.  
  7.  
  8.  
  9.      NAME
  10.           creatdb - create a data base
  11.  
  12.      SYNOPSIS
  13.           _c_r_e_a_t_d_b [ -_u_n_a_m_e ] [ -_e ] [ -_m ] [ +__c ] [ +__q ] dbname
  14.  
  15.      DESCRIPTION
  16.           Creatdb creates a  new  INGRES  database,  or  modifies  the
  17.           status  of  an  existing  database.  The person who executes
  18.           this command becomes the Database  Administrator  (DBA)  for
  19.           the database.  The DBA has special powers not granted to or-
  20.           dinary users.
  21.  
  22.           _D_b_n_a_m_e is the name of the database to be created.  The  name
  23.           must be unique among all INGRES users.
  24.  
  25.           The flags +__c and +__q specify options on  the  database.   The
  26.           form  +_x  turns  an option on, while -_x turns an option off.
  27.           The -_c flag turns off the concurrency  control  scheme  (de-
  28.           fault on).  The +_q flag turns on query modification (default
  29.           on).
  30.  
  31.           Concurrency control should not be turned off except on data-
  32.           bases  which are never accessed by more than one user.  This
  33.           applies even if users do not  share  data  relations,  since
  34.           system  relations are still shared.  If the concurrency con-
  35.           trol scheme is not installed in UNIX, or if the special file
  36.           /dev/lock does not exist or is not accessible for read-write
  37.           by INGRES, concurrency control acts  as  though  it  is  off
  38.           (although  it  will suddenly come on when the lock driver is
  39.           installed in UNIX).
  40.  
  41.           Query modification must be turned on for the protection, in-
  42.           tegrity,  and  view  subsystems to work, however, the system
  43.           will run slightly slower in some cases if it is  turned  on.
  44.           It  is  possible  to turn query modification on if it is al-
  45.           ready off in an existing database, but it is not possible to
  46.           turn it off if it is already on.
  47.  
  48.           Databases with query modification turned off create new  re-
  49.           lations  with all access permitted for all users, instead of
  50.           no access except to the owner,  the  default  for  databases
  51.           with query modification enabled.
  52.  
  53.           Database options for an existing database may be modified by
  54.           stating the -_e flag.  The database is adjusted to conform to
  55.           the option flags.  For example:
  56.  
  57.                   creatdb -e +q mydb
  58.  
  59.           turns query  modification  on  for  database  ``mydb''  (but
  60.           leaves  concurrency  control  alone).  Only the database ad-
  61.           ministrator (DBA) may use the -_e flag.
  62.  
  63.           When query modification is turned on, new relations will  be
  64.           created  with  no  access,  but previously created relations
  65.           will still have all access to everyone.  The _d_e_s_t_r_o_y command
  66.           may  be  used  to remove this global permission, after which
  67.           more selective permissions may be specified with the  _p_e_r_m_i_t
  68.           command.
  69.  
  70.           The INGRES user may use the -_u flag to specify  a  different
  71.           DBA:  the  flag  should be immediately followed by the login
  72.           name of the user who should be the DBA.
  73.  
  74.           The -_m flag specifies that the UNIX directory in  which  the
  75.           database  is  to reside already exists.  This should only be
  76.           needed if the directory if a mounted file system,  as  might
  77.           occur  for  a very large database.  The directory must exist
  78.           (as .../_d_a_t_a/_b_a_s_e/_d_b_n_a_m_e), must be mode  777,  and  must  be
  79.           empty of all files.
  80.  
  81.           The user who executes this command must have  the  U_CREATDB
  82.           bit set in the status field of her entry in the users file.
  83.  
  84.           The INGRES superuser can create a file in .../_d_a_t_a/_b_a_s_e con-
  85.           taining  a single line which is the full pathname of the lo-
  86.           cation of the database.  The file must be  owned  by  INGRES
  87.           and  be  mode 600.  When the database is created, it will be
  88.           created in the file named,  rather  than  in  the  directory
  89.           .../_d_a_t_a/_b_a_s_e.      For     example,     if     the     file
  90.           .../_d_a_t_a/_b_a_s_e/_e_r_i_c_d_b contained the line
  91.  
  92.                   /mnt/eric/database
  93.  
  94.           then the database  called  ``ericdb''  would  be  physically
  95.           stored  in  the  directory /mnt/eric/database rather than in
  96.           the directory .../data/base/ericdb.
  97.  
  98.      EXAMPLE
  99.           creatdb demo
  100.           creatdb -ueric -q erics_db
  101.           creatdb -e +q -c -u:av erics_db
  102.  
  103.      FILES
  104.           .../files/dbtmplt7
  105.           .../files/data/base/*
  106.           .../files/datadir/* (for compatibility  with  previous  ver-
  107.           sions)
  108.  
  109.      SEE ALSO
  110.           demodb(unix),   destroydb(unix),   users(files),   chmod(I),
  111.           destroydb(quel), permit(quel)
  112.  
  113.      DIAGNOSTICS
  114.           No database name specified.
  115.               You have not specified  the  name  of  the  database  to
  116.               create (or modify) with the command.
  117.           You may not access this database
  118.               Your entry in the users file says you are not authorized
  119.               to access this database.
  120.           You are not a valid INGRES user
  121.               You do not have a users file entry, and can not do  any-
  122.               thing with INGRES at all.
  123.           You are not allowed this command
  124.               The U_CREATDB bit is not set in your users file entry.
  125.           You may not use the -u flag
  126.               Only the INGRES superuser may become someone else.
  127.           <name> does not exist
  128.               With -_e or -_m, the directory does not exist.
  129.           <name> already exists
  130.               Without either -_e or -_m,  the  database  (actually,  the
  131.               directory) already exists.
  132.           <name> is not empty
  133.               With the -_m flag, the directory you named must be empty.
  134.           You are not the DBA for this database
  135.               With the -_e flag, you must be the  database  administra-
  136.               tor.
  137.  
  138.